package com.itwk.yygh.cmn.controller;

import com.itwk.yygh.cmn.service.DictService;
import com.itwk.yygh.common.result.Result;
import com.itwk.yygh.hosp.model.cmn.Dict;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author wangke
 * @version 1.0.0
 * @Description TODO
 * @createTime 2021年08月21日 16:35:00
 */
@RestController
@Api(tags = "数据字典控制器")
@RequestMapping("/admin/cmn/dict")
public class DictController {
    @Autowired
    private DictService dictService;
    @GetMapping("/findChildData/{id}")
    public Result findChildData(@PathVariable Long id){
      List<Dict> dicts = dictService.findChildData(id);
      return Result.ok(dicts);
    }
}
